/*
* @Author: w1583
* @Date:   2017-06-01 23:00:10
* @Last Modified by:   wanghongfucoder
* @Last Modified time: 2017-06-01 23:05:58
*/

#include <stdio.h>
#define MAX 100+10
int a[MAX];
int main() {
	int i,x,n=0;
	while(scanf("%d",&x)==1) {
	    a[n++]=x;
	}
	for (int i = n-1; i >=1; i--)
	{
		printf("%d ",a[i]);
	}
	printf("%d\n",a[0]);
    return 0;
}